// token设置  （这个模块设置了token）

import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token'

// 读取token
export function getToken() {
  return Cookies.get(TokenKey)
}

// 设置token
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

// 移除token
export function removeToken() {
  return Cookies.remove(TokenKey)
}

// ------------------------------------------------------------------------------

const timeKey = 'hrsaas-ihrm-time'

// 读时间戳
export function getTimeStamp() {
  return Cookies.get(timeKey)
}

// 设置时间戳
export function setTimeStamp() {
  return Cookies.set(timeKey, Date.now())
}
